﻿
@{
    ViewBag.Title = "Index";
    Layout = "~/Areas/ShopManage/Views/Shared/_Layout.cshtml";
}
<style type="text/css">
    .search-user {
    }

    .search-user-table td {
        padding: 5px;
    }
</style>
<div class="search-user">
    <table class="layui-form search-user-table" align="center">
        <tr>
            <td align="right">手机号码:</td>
            <td>
                <input type="text" class="layui-input" id="txt-Search-Phone" maxlength="11"
                       style="width: 120px;" />
            </td>
            <td>
                <button type="button" id="btn-Search" class="layui-btn layui-btn-normal">
                    <i class="layui-icon layui-icon-search"></i>搜 索
                </button>
            </td>
        </tr>
        <tr>
            <td align="right">姓名:</td>
            <td colspan="2">
                <input type="text" class="layui-input" id="txt-Search-Name" maxlength="10"
                       style="width: 180px;" />
            </td>
        </tr>
        <tr>
            <td align="right">邀请码:</td>
            <td colspan="2">
                <input type="text" class="layui-input" id="txt-Search-InvitationCode" maxlength="6"
                       style="width: 100px;" />
            </td>
        </tr>
        <tr>
            <td align="right">推荐人:</td>
            <td colspan="2">
                <input type="text" class="layui-input" id="txt-Search-Reference" maxlength="10"
                       style="width: 100px;" />
            </td>
        </tr>
        <tr>
            <td align="right">推荐人邀请码:</td>
            <td colspan="2">
                <input type="text" class="layui-input" id="txt-Search-ReferenceInvitationCode" maxlength="6"
                       style="width: 100px;" />
            </td>
        </tr>
        <tr>
            <td align="right">状态:</td>
            <td colspan="2">
                <select id="sel-Search-State" style="width: 100px;">
                    <option value="" selected="selected">请选择</option>
                    <option value="1">启用</option>
                    <option value="0">禁用</option>
                </select>
            </td>
        </tr>
    </table>
</div>
<style type="text/css">
    .userStatistics {
        padding-top: 10px;
        width: 90%;
        margin: 0px auto;
    }

    .userStatisticsTable {
        border: 1px solid #dddddd;
    }

        .userStatisticsTable td {
            padding: 10px;
            font-size: 16px;
        }
</style>
<div class="userStatistics" id="UserStatistics">
    <table class="userStatisticsTable" align="center">
        <tr>
            <td colspan="2" align="center" valign="middle">统计信息</td>
        </tr>
        <tr>
            <td>成员总数:</td>
            <td><label id="UserStatistics-Count">0</label></td>
        </tr>
    </table>
</div>
<style type="text/css">
    .list {
        width: 95%;
        margin: 0px auto;
        margin-top: 20px;
    }

    .list-table {
        border: 1px solid #dddddd;
        width: 90%;
        font-size: 16px;
        margin-bottom: 20px;
    }

        .list-table tr {
            border-bottom: 1px dashed #dddddd;
        }

        .list-table td {
            height: 25px;
            padding: 5px;
        }

    .disabledState {
        color: red;
    }

    .layui-bg-brown {
        background-color: brown;
    }
</style>
<div class="list layui-form" id="UserList">

</div>
<script type="text/html" id="UserListTable">
    <table class="list-table" align="center">
        <tr>
            <td align="right">手机号码:</td>
            <td><label>{{Phone}}</label></td>
        </tr>
        <tr>
            <td align="right">姓名:</td>
            <td><label>{{Name}}</label></td>
        </tr>
        <tr>
            <td align="right">邀请码:</td>
            <td><label>{{InvitationCode}}</label></td>
        </tr>
        <tr>
            <td align="right">推荐人:</td>
            <td><label class="buyer">{{Reference}}</label></td>
        </tr>
        <tr>
            <td align="right">推荐人邀请码:</td>
            <td><label class="seller">{{ReferenceInvitationCode}}</label></td>
        </tr>
        <tr>
            <td align="right">注册时间:</td>
            <td><label class="amount">{{CreateTime}}</label></td>
        </tr>
        <tr>
            <td align="right">状态:</td>
            <td><label>{{State}}</label></td>
        </tr>
        <tr style="border-bottom-style: none;">
            <td colspan="2" align="center">
                <a class="layui-btn layui-btn-sm layui-bg-purple view-UserAccountInfo"
                   tagUserId="{{UserId}}">账户信息</a>
                <a class="layui-btn layui-btn-sm layui-bg-blue view-UserStructure"
                   tagUserId="{{UserId}}">人员架构</a>
                <a class="layui-btn layui-btn-sm layui-bg-green update-UserInfo"
                   tagUserId="{{UserId}}">修改用户</a>
                <a class="layui-btn layui-btn-sm layui-bg-brown update-UserReference"
                   tagUserId="{{UserId}}">调整所属</a>
            </td>
        </tr>
        <tr style="border-bottom-style: none;">
            <td colspan="2" align="center">
                <a class="layui-btn layui-btn-sm layui-bg-cyan reset-UserState"
                   tagUserId="{{UserId}}">用户状态</a>
                <a class="layui-btn layui-btn-sm layui-bg-orange reset-ShopManagerLevel"
                   tagUserId="{{UserId}}">店长级别</a>
                <a class="layui-btn layui-btn-sm layui-bg-red reset-UserPassword"
                   tagUserId="{{UserId}}">重设密码</a>
            </td>
        </tr>
    </table>
</script>
<style type="text/css">
    .userAccountInfoTable {
    }

        .userAccountInfoTable td {
            padding: 5px;
        }
</style>
<script type="text/html" id="ViewUserAccountInfoDlg">
    <form class="layui-form">
        <div class="layui-tab">
            <ul class="layui-tab-title">
                <li class="layui-this">微信收款码</li>
                <li>支付宝收款码</li>
                <li>银行卡信息</li>
            </ul>
            <div class="layui-tab-content" style="padding: 0px;">
                <div class="layui-tab-item layui-show"><img class="wechat" /></div>
                <div class="layui-tab-item"><img class="alipay" /></div>
                <div class="layui-tab-item" style="padding-top: 10px;">
                    <table align="center" class="userAccountInfoTable">
                        <tr>
                            <td align="right">开户名:</td>
                            <td><label class="lbBankAccountName">&nbsp;&nbsp;</label></td>
                        </tr>
                        <tr>
                            <td align="right">开户行:</td>
                            <td><label class="lbBankName">&nbsp;&nbsp;</label></td>
                        </tr>
                        <tr>
                            <td align="right">卡号:</td>
                            <td><label class="lbBankCardNo">&nbsp;&nbsp;</label></td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
    </form>
</script>
<style type="text/css">
    .layui-tree-txt {
        font-size: 18px;
    }
</style>
<script type="text/html" id="ViewUserStructureDlg">
    <form class="layui-form" style="height: 100%">
        <div class="treeContainer"></div>
    </form>
</script>
<style type="text/css">
    .updateUserInfoDlg-table {
        height: 100%;
    }

        .updateUserInfoDlg-table td {
            padding: 5px;
        }
</style>
<script type="text/html" id="UpdateUserInfoDlg">
    <form class="lyaui-form" id="UpdateUserInfoDlg-Form" style="height: 100%;">
        <table class="updateUserInfoDlg-table" align="center">
            <tr>
                <td align="right">姓名:</td>
                <td>
                    <input type="text" class="layui-input" maxlength="10"
                           lay-verify="required|name" lay-vertype="tips"
                           lay-reqtext="请输入姓名" id="txt-UpdateUserInfoDlg-Name" />
                </td>
            </tr>
            <tr>
                <td align="right">手机号码:</td>
                <td>
                    <input type="text" class="layui-input" maxlength="11"
                           lay-verify="required|phone" lay-vertype="tips"
                           lay-reqtext="请输入手机号码" id="txt-UpdateUserInfoDlg-Phone" />
                </td>
            </tr>
            <tr>
                <td>&nbsp;&nbsp;</td>
                <td>
                    <button type="button" id="btn-UpdateUserInfoDlg-OK"
                            class="layui-btn layui-btn-normal"
                            lay-submit=""
                            lay-filter="filter-UpdateUserInfoDlg-OK">
                        <i class="layui-icon layui-icon-ok"></i>确 定
                    </button>
                </td>
            </tr>
        </table>
    </form>
</script>
<style type="text/css">
    .updateUserReferenceDlg-table {
        height: 100%;
    }

        .updateUserReferenceDlg-table td {
            padding: 5px;
        }
</style>
<script type="text/html" id="UpdateUserReferenceDlg">
    <form class="layui-form" style="height: 100%;">
        <table class="updateUserReferenceDlg-table" align="center">
            <tr>
                <td align="right">姓名:</td>
                <td colspan="2"><label id="lb-UpdateUserReferenceDlg-Name"></label></td>
            </tr>
            <tr>
                <td align="right">邀请码:</td>
                <td colspan="2"><label id="lb-UpdateUserReferenceDlg-InvitationCode"></label></td>
            </tr>
            <tr>
                <td align="right">推荐人:</td>
                <td><label id="lb-UpdateUserReferenceDlg-Reference"></label></td>
                <td>
                    <button type="button" id="btn-UpdateUserReferenceDlg-ShowSearchUserDlg"
                            class="layui-btn layui-btn-sm">
                        <i class="layui-icon layui-icon-edit"></i>修 改
                    </button>
                </td>
            </tr>
            <tr>
                <td align="right">推荐人邀请码:</td>
                <td colspan="2"><label id="lb-UpdateUserReferenceDlg-ReferenceInvitationCode"></label></td>
            </tr>
            <tr>
                <td>&nbsp;&nbsp;</td>
                <td colspan="2">
                    <button type="button" id="btn-UpdateUserReferenceDlg-OK"
                            class="layui-btn layui-btn-normal">
                        <i class="layui-icon layui-icon-ok"></i>确 定
                    </button>
                </td>
            </tr>
        </table>
    </form>
</script>
<style type="text/css">
    .searchUserDlg-table td {
        padding: 5px;
    }

    .selected-result {
        color: red;
        font-size: 14px;
    }

    .searchUserDlg-UserList {
        border: 1px solid #dddddd;
        padding: 5px;
        width: 90%;
    }

        .searchUserDlg-UserList label {
            margin-right: 10px;
            margin-bottom: 10px;
            font-size: 14px;
            border: 1px solid #eeeeee;
            padding: 5px 10px;
            display: inline-block;
        }
</style>
<script type="text/html" id="SearchUserDlg">
    <form class="layui-form" style="height: 100%;">
        <table class="searchUserDlg-table" width="100%" align="center">
            <tr>
                <td align="right" width="80">姓名:</td>
                <td width="100" align="left">
                    <input type="text" class="layui-input" id="txt-SearchUserDlg-Name"
                           maxlength="10" />
                </td>
                <td align="left">
                    <button type="button" id="btn-SearchUserDlg-Search"
                            class="layui-btn layui-btn-normal">
                        <i class="layui-icon layui-icon-search"></i>搜 索
                    </button>
                </td>
            </tr>
            <tr>
                <td align="right">选择会员:</td>
                <td colspan="2"><label id="lb-SearchUserDlg-Name" class="selected-result">未选择！</label></td>
            </tr>
            <tr>
                <td align="right" valign="top">会员列表:</td>
                <td valign="top" colspan="2">
                    <div id="SearchUserDlg-UserList" class="searchUserDlg-UserList">
                    </div>
                </td>
            </tr>
        </table>
    </form>
</script>
<style type="text/css">
    .resetUserStateDlg-table {
        height: 100%;
    }

        .resetUserStateDlg-table td {
            padding: 5px;
        }
</style>
<script type="text/html" id="ResetUserStateDlg">
    <form class="layui-form" style="height: 100%;">
        <table align="center" class="resetUserStateDlg-table">
            <tr>
                <td align="right">姓名:</td>
                <td><label id="lb-ResetUserStateDlg-Name"></label></td>
            </tr>
            <tr>
                <td align="right">状态:</td>
                <td>
                    <select id="sel-ResetUserStateDlg-State">
                        <option value="1">启用</option>
                        <option value="0">禁用</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td>&nbsp;&nbsp;</td>
                <td valign="middle">
                    <button type="button" id="btn-ResetUserStateDlg-OK"
                            class="layui-btn layui-btn-normal">
                        <i class="layui-icon layui-icon-ok"></i>确 定
                    </button>
                </td>
            </tr>
        </table>
    </form>
</script>
<style type="text/css">
    .resetShopManagerLevelDlg-table {
        height: 100%;
    }

        .resetShopManagerLevelDlg-table td {
            padding: 5px;
        }
</style>
<script type="text/html" id="ResetShopManagerLevelDlg">
    <form class="layui-form" style="height: 100%;">
        <table class="resetShopManagerLevelDlg-table" align="center">
            <tr>
                <td align="right">姓名:</td>
                <td><label id="lb-ResetShopManagerLevelDlg-Name"></label></td>
            </tr>
            <tr>
                <td align="right">店长级别:</td>
                <td>
                    <select id="sel-ResetShopManagerLevelDlg-Level">
                        <option value="0">自动计算</option>
                        <option value="0.005">初级店长</option>
                        <option value="0.006">中级店长</option>
                        <option value="0.007">高级店长</option>
                        <option value="0.008">旗舰店长</option>
                        <option value="0.01">直营店长</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td>&nbsp;&nbsp;</td>
                <td valign="middle">
                    <button type="button" id="btn-ResetShopManagerLevelDlg-OK"
                            class="layui-btn layui-btn-normal">
                        <i class="layui-icon layui-icon-ok"></i>确 定
                    </button>
                </td>
            </tr>
        </table>
    </form>
</script>
<style type="text/css">
    .resetUserPwdDlg-table td {
        padding: 5px;
    }
</style>
<script type="text/html" id="ResetUserPwdDlg">
    <form class="layui-form" action="/" style="padding: 10px;">
        <table class="resetUserPwdDlg-table" align="center" width="90%">
            <tr>
                <td align="right">新密码:</td>
                <td>
                    <input type="password" class="layui-input" id="txt-ResetUserPwdDlg-Pwd"
                           maxlength="20"
                           lay-verify="required|pwd" lay-vertype="tips"
                           lay-reqtext="请输入新密码" />
                </td>
            </tr>
            <tr>
                <td align="right">确认新密码:</td>
                <td>
                    <input type="password" class="layui-input" id="txt-ResetUserPwdDlg-Pwd2"
                           maxlength="20"
                           lay-verify="required|pwd|pwd2" lay-vertype="tips"
                           lay-reqtext="请输入确认新密码" />
                </td>
            </tr>
            <tr>
                <td align="right">&nbsp;&nbsp;</td>
                <td>
                    <button type="button" id="btn-ResetUserPwdDlg-OK"
                            class="layui-btn layui-btn-normal"
                            lay-submit=""
                            lay-filter="filter-ResetUserPwdDlg-OK">
                        <i class="layui-icon layui-icon-ok"></i>确 定
                    </button>
                </td>
            </tr>
        </table>
    </form>
</script>

<script type="text/javascript" src="~/Static/Js/shopmanage/user.js?rand=01234"></script>